// lib/main.dart
import 'package:enjoy_plus_community/routes/index.dart';
import 'package:flutter/material.dart';
import 'package:enjoy_plus_community/stores/counter.dart';
import 'package:provider/provider.dart';

void main() {
  runApp(
    MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (_) => CounterModel()),
      ],
      child: MaterialApp(
        routes: AppRouter.routes, // 使用静态路由表
        onGenerateRoute: AppRouter.onGenerateRoute, // 使用动态路由生成
        initialRoute: AppRouter.home, // 使用路由常量
      ),
    ),
  );
}